package com.shxc.smarttrade.old.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.shxc.smarttrade.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by jcdev1 on 2017/6/12.
 */

public class WithdrawResultActivity extends BaseActivity {
    @BindView(R.id.tv_center)
    TextView tvCenter;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.iv_status)
    ImageView ivStatus;
    @BindView(R.id.tv_recharge_status)
    TextView tvRechargeStatus;
    @BindView(R.id.tv_excharge_rate)
    TextView tvExchargeRate;
    @BindView(R.id.tv_china_yuan)
    TextView tvChinaYuan;
    private double rmbAmount;
    private double dollar;
    private double rate;
    private int status;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_withdraw_result);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        Intent intent = getIntent();
        rmbAmount = intent.getDoubleExtra("rmbAmount", 0);
        dollar = intent.getDoubleExtra("dollar", 0);
        rate = intent.getDoubleExtra("rate", 0);
        status = intent.getIntExtra("status", 0);

        tvCenter.setText("提交成功");
        tvRight.setText("完成");
        tvChinaYuan.setText("¥" + rmbAmount);
        tvExchargeRate.setText("" + rate);
        tvRechargeStatus.setText("$" + dollar);
    }


    @Override
    protected void onDestroy() {
        super.onDestroy();

    }

    @OnClick({R.id.tv_right, R.id.btn_goon_recharge, R.id.btn_look_detail})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_right:
                finish();
                break;
            case R.id.btn_goon_recharge:
                finish();
                break;
            case R.id.btn_look_detail:
                startActivity(new Intent(WithdrawResultActivity.this, AccountInfomationActivity.class));
                finish();
                break;
        }
    }
}
